home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / DTS Sample Code / Snippets / Platforms & Tools / MacApp / AEGestalt 1.0b3 / AEGestalt.r < prev    next >
Encoding:
Text File  |  1991-12-11  |  4.3 KB  |  252 lines  |  [TEXT/MPS ]

  1. //     Copyright © 1991 by Apple Computer, Inc.  All rights reserved. 
  2. //     AEGestalt.r file.
  3. //    Kent Sandvik DTS
  4. //    This file contains all the normal MacApp resources, with
  5. //    the exception of the window/view resources which are in the
  6. //    views.rsrc file (in 3.0 'View' format). The "2.0 views.rsrc"
  7. //    file contains the same information in the old format.
  8.  
  9.  
  10. // INCLUDES 
  11.  
  12. #ifndef __TYPES.R__
  13. #include "Types.r"
  14. #endif
  15.  
  16. #ifndef __SYSTYPES.R__
  17. #include "SysTypes.r"                // needed for version resource
  18. #endif        
  19.  
  20. #ifndef __MacAppTypes__
  21. #include "MacAppTypes.r"
  22. #endif
  23.  
  24. #if qTemplateViews
  25. #ifndef __ViewTypes__
  26. #include "ViewTypes.r"
  27. #endif
  28. #endif
  29.  
  30. #if qDebug
  31. include "Debug.rsrc";
  32. #endif
  33.  
  34. #ifndef __RESOURCECONSTANTS__
  35. #include "ResourceConstants.h"            // common header file for resource IDs
  36. #endif
  37.  
  38.  
  39. // RESOURCES FILES
  40.  
  41. include "MacApp.rsrc";
  42. include "views.rsrc";
  43.  
  44.  
  45. // CODE 
  46.  
  47. include $$Shell("ObjApp")"AEGestalt" 'CODE';
  48.  
  49.  
  50. // CONSTANTS
  51.  
  52. // Finder Information
  53.  
  54. #define kApplicationName                $$Shell("XAppName")
  55.  
  56.  
  57. // SIZE
  58.  
  59. resource 'SIZE' (-1) {
  60.     saveScreen,
  61.     acceptSuspendResumeEvents,
  62.     enableOptionSwitch,
  63.     canBackground,
  64.     doesActivateOnFGSwitch,
  65.     backgroundAndForeground,
  66.     dontGetFrontClicks,
  67.     ignoreAppDiedEvents,
  68.     is32BitCompatible,
  69.     isHighLevelEventAware,
  70.     localAndRemoteHLEvents,
  71.     isStationeryAware,                
  72.     reserved,
  73.     reserved,
  74.     reserved,
  75.     reserved,
  76. #if qModelFarCode
  77.     575 * 1024,
  78.     550 * 1024,
  79. #elif qDebug
  80.     850 * 1024,
  81.     850 * 1024
  82. #else
  83.     500 * 1024,
  84.     500 * 1024
  85. #endif
  86. };
  87.  
  88.  
  89. // APPLEEVENTS 
  90.  
  91. resource 'aedt' (kGestaltAEEvents) {        // AE Dispatch table resource
  92.     {
  93.     kMacAppClass, kAEGetConfig, cAEProvideGestaltInfo;
  94.     }
  95. };
  96. //    AE Class, AE Message ID, command Number
  97.  
  98. // SEG!
  99.  
  100. resource 'seg!' (256, purgeable) {
  101.     {
  102.         "GNonRes";
  103.         "GSelCommand";
  104.         "GTerminate";
  105.         "GClose";
  106.         "GDoCommand";
  107.     }
  108. };
  109.  
  110.  
  111. // VERS
  112.  
  113. include "Defaults.rsrc"  'vers' (1);                // application or file specific
  114. include "Defaults.rsrc"  'vers' (2);                // overall package
  115.  
  116.  
  117. // ALERTS AND DLOGS 
  118.  
  119. include "Defaults.rsrc" 'ALRT'    (phAboutApp);        // About… window
  120. include "Defaults.rsrc" 'DITL'    (phAboutApp);        // About… contents
  121. include "Defaults.rsrc" 'STR#'    (kDefaultCredits);    // credits
  122.  
  123.  
  124. // ICONs and BUNDLE
  125. // Get the default MacApp® application icon and file reference
  126.  
  127. include "Defaults.rsrc"  'ICN#' (128);
  128.  
  129.  
  130. // CMNUs 
  131.  
  132. include "Defaults.rsrc" 'CMNU' (mApple);            // grab the default Apple/File menus
  133.  
  134. resource 'CMNU' (mFile,
  135. #if qNames
  136. "mFile",
  137. #endif
  138. nonpurgeable) {
  139.     mFile,
  140.     textMenuProc,
  141.     EnablingManagedByMacApp,
  142.     enabled,
  143.     "File",
  144.     {
  145.     "New",                noIcon, "N",    noMark, plain, cNew;
  146.     "Close",            noIcon, "W",    noMark, plain, cClose;
  147.     "-",                noIcon, noKey,    noMark, plain, nocommand;
  148.     "Quit",                noIcon, "Q",    noMark, plain, cQuit
  149.     }
  150. };
  151.  
  152. resource 'CMNU' (mExamine,
  153. #if qNames
  154. "mExamine",
  155. #endif
  156. nonpurgeable) {
  157.     mExamine,
  158.     textMenuProc,
  159.     allEnabled,
  160.     enabled,
  161.     "Examine",
  162.     {
  163.     "Find…",            noIcon, "F",    noMark, plain, cFindAEGestalt;
  164.     "Report…",            noIcon, "R",    noMark, plain, cCreateReport
  165.     }
  166. };
  167.  
  168.  
  169. // MBARs 
  170. // Displayed menus 
  171.  
  172. resource 'MBAR' (kMBarDisplayed,
  173. #if qNames
  174. "Windoid",
  175. #endif
  176.     purgeable) {
  177.     {mApple; mFile; mExamine}
  178. };
  179.  
  180.  
  181. //--------------------------------------------------------------------------------------------------
  182. //     Icons, Bundles and FRefs… Oh my! (don't forget the Signature)
  183. //    It is very important that the Signature is registered here, because
  184. //    we are using it as a way to register the application PPC port, and 
  185. //    otherwise we will get a default name, which will not show up in the
  186. //    PPCBrowse filtering function. I learned this hard lesson 3.23 am
  187. //    and it was even a Saturday morning, sigh!
  188.  
  189. type kSignature as 'STR ';
  190. resource kSignature (0,
  191. #if qNames
  192. "Signature",
  193. #endif
  194.     purgeable) {
  195.     "AEGestalt 3.0b2 ©Apple Computer, Inc. 1991"
  196. };
  197.  
  198. resource 'FREF' (kApplicationID,
  199. #if qNames
  200. "AEGestalt Application",
  201. #endif
  202.     purgeable) {
  203.     'APPL',
  204.     0,
  205.     ""
  206. };
  207.  
  208. resource 'FREF' (kDocumentID,
  209. #if qNames
  210. "AEGestalt Document",
  211. #endif
  212.     purgeable) {
  213.     kFileType,
  214.     1,
  215.     ""
  216. };
  217.  
  218. resource 'FREF' (kStationeryID,
  219. #if qNames
  220. "AEGestalt Stationery",
  221. #endif
  222.     purgeable) {
  223.     kStationery,
  224.     2,
  225.     ""
  226. };
  227.  
  228. resource 'BNDL' (kBundleID,
  229. #if qNames
  230. "AEGestalt",
  231. #endif
  232.     purgeable) {
  233.     kSignature,
  234.     0,
  235.     { /* array TypeArray: 2 elements */
  236.         /* [1] */
  237.         'ICN#',
  238.         { /* array IDArray: 3 elements */
  239.             0, kApplicationID,
  240.             1, kDocumentID,
  241.             2, kStationeryID
  242.         },
  243.         /* [2] */
  244.         'FREF',
  245.         { /* array IDArray: 3 elements */
  246.             0, kApplicationID,
  247.             1, kDocumentID,
  248.             2, kStationeryID
  249.         }
  250.     }
  251. };
  252.